<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>TopBar</title>
    <!-- Bootstrap core CSS -->
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div th:fragment="top">
    <nav class="navbar navbar-fixed-top navbar-inverse">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#" th:href="@{/logisticsPlatform}">Logistic通运网</a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class="active" id="p1"><a href="#" th:href="@{/logisticsPlatform}">首页</a></li>
                    <li id="p2"><a href="#" th:href="@{/logisticsPlatform/route_list_all}">物流专线</a></li>
                    <li id="p3"><a href="#" th:href="@{/logisticsPlatform/material_list_all}">货源信息</a></li>
                    <li id="p4"><a href="#" th:href="@{/logisticsPlatform/company_list_all}">物流公司</a></li>
                    <li id="p6"><a href="#" th:href="@{/logisticsPlatform/news_list_all}">物流资讯</a></li>
                    <li id="p5"><a href="#" th:href="@{/logisticsPlatform/contact_us}">联系我们</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li th:if="${session.user} == null"><a th:href="@{'/logisticsPlatform/logIn'}">您好,请登录!/注册</a></li>
                    <li th:if="${session.user} != null"><a id="nowClient" th:href="@{'/clientCenter?clientAccount='+${session.user}}" th:text="${session.user}"></a></li>
                    <li th:if="${session.user} != null"><a href="/front_logout" onclick="if (confirm('确认退出账号吗')===false) return false; ">注销</a></li>
                </ul>
            </div>
        </div>
    </nav>
</div>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../jquery-3.3.1.js"></script>
<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

</body>
</html>